Presentation
Project management
Computer-aided design
Computer-controlled cutting
Electronics production
3D scanning and printing
Electronics design
Molding and casting
Embedded programming
Computer-controlled machining
Input devices
Composites
Interface and App. programming
Output Devices
Networking and comunications
Mechanical Design
Machine Design
Applications and Implications
Invention, Intellectual Property
Project Development
Final Project Presentations
Extra Project
Links
http://ricardoorg.dx.am/
presentation contact

 

Embedded programming

This assignment was something new for me, as industrial designer i had always another person who knows electronics and programming. But there was always a wall for developing a product because, this person doesn't understand what i mean or i dont understand how to do this programms. Now i m understanding everything.

So i started with many problems, my fab ISP had problems because it was not recognized by the computer and i couldn't programm it, despite it had a green light when i connect it to de AVRisp. So i weld another one (my third fab ISP) and everything was correct. (By the way i m now expert welding this small superficial electronic boards)

About the hello board, i had no fab ISP so i programmed it with de AVRisp using the software Attmel Studio 6. The idea, as begginer, was only to turn on the led using the botton, but i had also to weld another hello board because after a few minutes of use, the light of the AVRisp was yellow, so something was wrong with my hello board, when i press very hard the botton it worked but the never worked again. Thats why i had to mill and weld another hello board.

 
#include <avr/io.h>
/*
       *This is a program to turn on LED when button is pushed
       */
       int main(void)
       {
              
       //define pin mode
       DDRA = 0b11111111;	//only PA7 is input mode
       DDRB = 0b11111011;	//All PB is output mode
                 
      //define output(High or Low) of port using hexadecimal(hex)
       PORTA = 0b00000000;	// pull-up of PA7 OFF, PA1-6 is Low
       PORTB = 0b00000100;	//All PB are Low
                 
        while(1)
        {
        if(bit_is_clear(PINB, PINB2)){	//If PA7 is high, program inside parentheses is processed
        PORTA = 0b10000000;
        }else{							//Else, program inside else parentheses is processed
        PORTA = 0b00000000;
         }
            }
         return 0;
             }


After this i remember the programation in arduino and before this assignment i was asking to my university teacher and friend Sandro Ormeño how to programm the Attiny44, he made a tutorial of what we did on a protoboard using Attiny84 but using bigger components, here the video.

For programming with arduino, the most important thing is to download the files for having the Attiny micro controllers in the arduino software, this files are on this links below.

This are the links used for the video:

http://www.ladyada.net/learn/arduino/lesson5.html

http://hlt.media.mit.edu/?p=1695

This was using the Adafruit programmer, then i tryed using the FabISP.

The first thing is to be sure that the FabISP is connected to the PC

   
     

Then select in arduino they Usbtiny as programmer.

I used the tutorial of Anna kaziunas to be sure what i m doing but almost everything was the same process of the programation using the Adafruit programmer.

Finally the led works with the botton

 

 

© copyright 2013 Web Design by Ricardo Torres Aragón